#!/usr/bin/env python
PACKAGE = "iusc_indoor_env"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()
# name paramtype level description default min max 
gen.add("velocity", double_t, 0, "formation max velocity",0.5,0.0,2.0)
gen.add("distance", double_t, 0, "formation distance",0.5,0.0,5.0)
gen.add("formation_type",int_t, 0, "Formation Type 0:Tri,1:Rec,2:Cir", 0,  0, 2)
gen.add("traj_type",int_t, 0, "Trajectory Type 0:Cir,1:Rec,2:Random", 0,  0, 2)
gen.add("x", double_t, 0, "formation init location x",40.0,0.0,50.0)
gen.add("y", double_t, 0, "formation init location y",10.0,0.0,50.0)
gen.add("reset",bool_t,0, "Reset Formation UGVs",  False)
gen.add("stop",bool_t,1, "Stop Formation UGVs",  False)
gen.add("start",bool_t,1, "Start Formation UGVs",  False)
# 无人车相关参数
gen.add("ugv0_landed",bool_t,0, "UGV0 Landed Flag",  True)
gen.add("ugv1_landed",bool_t,0, "UGV1 Landed Flag",  False)
gen.add("ugv2_landed",bool_t,0, "UGV2 Landed Flag",  True)
gen.add("ugv3_landed",bool_t,0, "UGV3 Landed Flag",  True)
gen.add("ugv4_landed",bool_t,0, "UGV4 Landed Flag",  False)
gen.add("ugv5_landed",bool_t,0, "UGV5 Landed Flag",  True)
gen.add("ugv6_landed",bool_t,0, "UGV6 Landed Flag",  False)
gen.add("ugv7_landed",bool_t,0, "UGV7 Landed Flag",  True)
gen.add("ugv8_landed",bool_t,0, "UGV8 Landed Flag",  False)
gen.add("ugv9_landed",bool_t,0, "UGV9 Landed Flag",  True)

# size_enum = gen.enum([ gen.const("Small",      int_t, 0, "A small constant"),
#                        gen.const("Medium",     int_t, 1, "A medium constant"),
#                         gen.const("Large",      int_t, 2, "A large constant"),
#                         gen.const("ExtraLarge", int_t, 3, "An extra large constant")],
#                       "An enum to set size")
 
# gen.add("size", int_t, 0, "A size parameter which is edited via an enum", 1, 0, 3, edit_method=size_enum)

exit(gen.generate(PACKAGE, "iusc_indoor_env", "Formation"))